unzip: fix build GCC 15.1
authorTan Zien <[email protected]>
Sun, 6 Jul 2025 00:11:40 +0000 (08:11 +0800)
committerTianling Shen <[email protected]>
Wed, 9 Jul 2025 10:52:06 +0000 (18:52 +0800)
commitd3a2fb39a79a47b34b3c82f2be8dc4d4d56749bf
treec1fd9a47214abcd821a0b3ef87e49199ee84c9d9
parentab6ebc5c01a11835cdfcb9468428ba89cd5081af
unzip: fix build GCC 15.1

refer to:

https://gitlab.alpinelinux.org/alpine/aports/-/blob/b7410ac718d5eeae21001de5cae9159f597bb517/main/unzip/gcc15.patch

fix this:

unix/unxcfg.h:120:15: error: conflicting types for 'gmtime'; have 'struct tm *(void)'
  120 |    struct tm *gmtime(), *localtime();
      |               ^~~~~~
In file included from unix/unxcfg.h:119:
/home/nasbdh9/openwrt/staging_dir/toolchain-x86_64_gcc-15.1.0_musl/include/time.h:59:12: note: previous declaration of 'gmtime' with type 'struct tm *(const time_t *)' {aka 'struct tm *(const long int *)'}
   59 | struct tm *gmtime (const time_t *);
      |            ^~~~~~
unix/unxcfg.h:120:26: error: conflicting types for 'localtime'; have 'struct tm *(void)'
  120 |    struct tm *gmtime(), *localtime();
      |                          ^~~~~~~~~
/home/nasbdh9/openwrt/staging_dir/toolchain-x86_64_gcc-15.1.0_musl/include/time.h:60:12: note: previous declaration of 'localtime' with type 'struct tm *(const time_t *)' {aka 'struct tm *(const long int *)'}
   60 | struct tm *localtime (const time_t *);
      |            ^~~~~~~~~

Signed-off-by: Tan Zien <[email protected]>
utils/unzip/Makefile
utils/unzip/patches/012-fix-gcc15-build.patch [new file with mode: 0644]